package org.zht.dormpro.dorm.cacher.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.zht.dormpro.auth.bean.PageBean;
import org.zht.dormpro.dorm.aop.annotation.ClearCache;
import org.zht.dormpro.dorm.aop.annotation.GetCache;
import org.zht.dormpro.dorm.cacher.IStudentCacher;
import org.zht.dormpro.dorm.mapper.TbStudentMapper;
import org.zht.dormpro.dorm.model.TbStudent;
import org.zht.dormpro.pub.constant.CacheKey;

import java.util.List;

@Repository
public class StudentCacherImpl implements IStudentCacher {
    @Autowired
    TbStudentMapper tbStudentMapper;
    @Override
    @ClearCache(key = CacheKey.USER_KEY,fieldKey = "#id")
    public void deleteStudent(Integer id) {
    }
    @Override
    @ClearCache(key = CacheKey.USER_KEY,fieldKey = "#id")
    public void updateStudent(Integer id) {
    }
    @Override
    @GetCache(key = CacheKey.USER_KEY,fieldKey = "#id")
    public TbStudent getStudent(Integer id) {
        return tbStudentMapper.selectByPrimaryKey(id);
    }


}
